
package com.zsrt.day20170427.ch04;



import java.lang.reflect.Method;

import org.junit.Test;

public class PhoneTest {

	@Test
	public void test01() throws Exception {
		
		
				
		Class clazz = Class.forName("com.zsrt.day20170427.ch04.PhoneFactory");
		Method method = clazz.getMethod("generatePhone", String.class,int.class);
		Object object = method.invoke("generatePhone", "xiaomishouji",399999);
		
		System.out.println(object);
	}
	
	@Test
	public void test02() throws Exception {
		
		//Phone phone = new XiaomiPhone(34444);
	}
}
